<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>model</title>
	<meta name="author" content="Stark" />
	<!-- Date: 2018-10-24 -->
	<style type="text/css">
		* {
			font-size: 12px;
		}
		input {
			margin: 10px;
		}
		body {
			padding: 40px;
		}
	</style>
	<script type="text/javascript" src="jquery-1.8.3.js"></script>
	<script type="text/javascript" src="jquery.util.topic.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#sameHome").click(function(){
				var isc = $(this).prop("checked");
				if(isc){
					$("#sendAddress").val($("#homeAddress").val());
					$("#sendPhone").val($("#homePhone").val());
				}else{
					$("#sendAddress").val('');
					$("#sendPhone").val('');
				}
				$("#send input").setReadOnly(isc);
			});
		});
	</script> 
</head>
<body>
	<fieldset>
		<legend>请填入邮寄地址：</legend>
		<div id="home">
			<h3>输入家庭地址</h3>
			地址：<input type="text" id="homeAddress" name="homeAddress" size="40" /><br/>
			电话：<input type="text" id="homePhone" name="homePhone" size="40" /><br/>
		</div>
		
		<div id="send">
			<h3>输入邮寄地址</h3><input type="checkbox" id="sameHome"/>是否和家庭地址一致<br/>
			地址：<input type="text" id="sendAddress" name="sendAddress" size="40" /><br/>
			电话：<input type="text" id="sendPhone" name="sendPhone" size="40" /><br/>
		</div>
	</fieldset>
</body>
</html>

